<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
    <div id="app">
      <my-com-a></my-com-a>
      <my-com-b></my-com-b>
    </div>
</body>
<script src="./lib/vue.js"></script>
<script>
  let MyComponentA = {
          template: `
            <div>
              <h3>{{title}}</h3>
              <p>{{content}}</p>
            </div>
          `,
          data(){
            return {
              title : '标题a',
              content: '内容a'
            }
          }
      };
    let MyComB = {
          template: `
            <div>
              <h3>{{title}}</h3>
              <p>{{content}}</p>
            </div>
          `,
          data(){
            return {
              title : '标题b',
              content: '内容b'
            }
          }
      }
  new Vue({
    el: "#app",
    data: {

    },
    components: {
      'my-com-a': MyComponentA,
      MyComB
    }
  })
</script>
</html>